package bai9.model;

import java.lang.invoke.ConstantCallSite;
import java.util.Scanner;

public class Person {
	
	protected String name;
	protected String birthofdate;
	protected String address;
	protected String gender;
	public final static String GENDER_MALE="Male";
	public final static String GENDER_FEMALE="Female";
	public Person(){
		
	}
	public Person(String name, String birthofdate, String address, String gender) {
		this.name = name;
		this.birthofdate = birthofdate;
		this.address = address;
		this.gender = gender;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getBirthofdate() {
		return birthofdate;
	}
	public void setBirthofdate(String birthofdate) {
		this.birthofdate = birthofdate;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getGender() {
		return gender;
	}
	public void setGender(String gender) {
		this.gender = gender;
	}
	public Person inputPerson(){
		Scanner ip=new Scanner(System.in);
		System.out.println("Enter Name: ");
		String name=ip.nextLine();
		System.out.println("Enter BirthOfDate: ");
		String birthofdate=ip.nextLine();
		System.out.println("Enter Address: ");
		String address=ip.nextLine();
		System.out.println("Enter Gender:");
		System.out.println("1.Male");
		System.out.println("2.Female");
		int a=Integer.parseInt(ip.nextLine());
		if(a==1)
			gender=GENDER_MALE;
		else if(a==2)
			gender=GENDER_FEMALE;
		else System.out.println("Enter 1 or 2");
		Person ps=new Person(name,birthofdate,address,gender);
		return ps;
	}

}
